﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CondominioG1.Dominio.Residente>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>Dni</th>
            <th>Nombres</th>
            <th>Apellidos</th>
            <th>Edad</th>
            <th>Correo</th>
            <th>Tipo</th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Editar", "Edit", new { Codigo = item.Dni }) %> |
                <%: Html.ActionLink("Detalles", "Details", new { Codigo = item.Dni })%> |
                <%: Html.ActionLink("Eliminar", "Delete", new { Codigo = item.Dni })%>
            </td>
            <td>
                <%: item.Dni %>
            </td>
            <td>
                <%: item.Nombres %>
            </td>
            <td>
                <%: item.Apellidos %>
            </td>
            <td>
                <%: item.Edad %>
            </td>
            <td>
                <%: item.Correo %>
            </td>
            <td>
                <%: item.Tipo %>
            </td>
        </tr>
    
    <% } %>

    </table>
    <p>  
        <%: Html.ActionLink("Crear", "Create") %>
        <%: Html.ActionLink("Listar Residentes según correo", "Lista", new {Dominio = "upc.edu.pe"})%>
        <%: Html.TextBox("Filtro") %>
    </p>


</asp:Content>

